#include<bits/stdc++.h>
using namespace std;

struct node
{
	int x, y, step;
};


int cnt1, cnt2;
bool vis[110][110];
int dxy[][15] = {{-2, 1}, {-1, 2}, {1, 2}, {2, 1}, {2, -1}, {1, -2}, {-1, -2}, {-2, -1}, {-2, 2}, {2, 2}, {2, -2}, {-2, -2}};


void bfs(int x, int y, int &cnt)
{
	queue<node> q;
	q.push({x, y, 0});
	vis[x][y] = 1;
	
	while(!q.empty())
	{
		node t = q.front();
		q.pop();
		if(t.x == 1 && t.y == 1)
		{
			cnt = t.step;
			return ;
		}
		for(int i = 0;i < 12;i++)
		{
			int xx = t.x+dxy[i][0];
			int yy = t.y+dxy[i][1];
			if(!vis[xx][yy] && xx > 0 && xx < 101 && yy > 0 && yy < 101)
			{
				q.push({xx, yy, t.step+1});
				vis[xx][yy] = 1;
			}
		}
	}
}

int main()
{
	int x1, x2, y1, y2;
	cin>>x1>>y1>>x2>>y2;
	bfs(x1, y1, cnt1);
	memset(vis, 0, sizeof vis);
	bfs(x2, y2, cnt2);
	cout<<cnt1<<endl<<cnt2;
    return 0;
}

